package yue_4_21;

import java.io.File;

public class Zuoye1_2 {
	public long jisuan(File f1, String s1) {
		if (f1.isDirectory() == false) {
			return f1.length();
		} else {
			return jisuan1(f1.list(), s1);
		}
	}

	public long jisuan1(String[] s3, String s2) {
		long l = 0;
		for (int i = 0; i < s3.length; i++) {
			l = l + jisuan(new File(s2 + "//" + s3[i]), (s2 + "//" + s3[i]));
		}
		return l;
	}
}
